package cn.lb.listener;

import cn.lb.permission.service.IPermissionScanService;
import org.springframework.beans.factory.annotation.Autowired;

import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;
import javax.servlet.annotation.WebListener;

@WebListener
public class PermissionScan implements ServletContextListener {
    @Autowired
    private IPermissionScanService permissionScanService;
    @Override
    public void contextInitialized(ServletContextEvent sce) {
        permissionScanService.scan();
        System.out.println("初始化");
    }


    @Override
    public void contextDestroyed(ServletContextEvent sce) {

    }
}
